package com.qqtop10.manager.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qqtop10.manager.dao.CouponMapper;
import com.qqtop10.manager.model.Coupon;
import com.qqtop10.manager.model.CouponGoods;
import com.qqtop10.manager.model.CouponShop;
import com.qqtop10.manager.model.CouponShopAdd;
import com.qqtop10.manager.model.CouponUser;
import com.qqtop10.manager.model.PageCoupon;
import com.qqtop10.manager.model.PlatFormCouponDetails;
import com.qqtop10.manager.service.CouponService;

@Service("couponService")
public class CouponSerivceImpl implements CouponService {

	@Autowired
	private CouponMapper couponMapper;

	@Override
	public List<CouponUser> getUserCoupon(PageCoupon pageCoupon) {
		return couponMapper.getUserCoupon(pageCoupon);
	}

	@Override
	public List<CouponShop> getShopCoupon(PageCoupon pageCoupon) {
		return couponMapper.getShopCoupon(pageCoupon);
	}

	@Override
	public List<Coupon> getAllCoupon(PageCoupon pageCoupon) {
		return couponMapper.getAllCoupon(pageCoupon);
	}

	@Override
	public Coupon getOneCouponByUUID(String uuid) {
		return couponMapper.getOneCouponByUUID(uuid);
	}

	@Override
	public void addCouponInfo(CouponShopAdd coupon) {
		couponMapper.addCouponInfo(coupon);
	}

	@Override
	public void addShopCoupon(List<CouponShop> chouponShop) {
		couponMapper.addShopCoupon(chouponShop);
	}

	@Override
	public void addUserCoupon(CouponUser couponUser) {
		couponMapper.addUserCoupon(couponUser);
	}

	@Override
	public void addGoodsCoupon(List<CouponGoods> couponGoods) {
		couponMapper.addGoodsCoupon(couponGoods);
	}
	
	@Override
	public String selectUUIDByID(int id) {
		return couponMapper.selectUUIDByID(id);
	}

	@Override
	public int deleteById(String uuid) {
		return couponMapper.deleteById(uuid);
	}

	@Override
	public int deleteCouponUserByCouponUUID(String uuid) {
		return couponMapper.deleteCouponUserByCouponUUID(uuid);
	}
	
	@Override
	public List<PlatFormCouponDetails> selectPlatFormCouponDetails(){
		return couponMapper.selectPlatFormCouponDetails();
	}

}
